package com.yyfax.common.form;

/**
 * Created by fuqiang on 2017/4/28.
 * 校验银行卡输入框的处理类
 * Copyright  2017 www.yylending.com. All Rights Reserved.
 */
public class BankCardControl extends FormRowControl {

    @Override
    public boolean toastControl(int type, FormRow formRow, NoticeText noticeText) {
        if (type == 9) {
            FormInputView formInputView = (FormInputView) formRow.getRightView();
            return BankCardValidate.validate(formRow.getContext(), formInputView, noticeText);
        } else {
            if (getFormRowControl() != null) {
                return getFormRowControl().toastControl(type, formRow, noticeText);
            }
        }
        return true;
    }
}
